<?php

require_once '../app/admin/models/postlist.php';
require_once '../app/admin/models/postform.php';

require_once 'psk_ui_dbeditor.php';

class postsController extends PSK_Controller 
{
	private $postlist = null;
	private $postform = null;
	
	public $postEditor = null;
	
	function indexAction()
	{
		$this->layout->setTitle('Posts...');
		
		$this->postlist = new PostList($this);
		$this->postform = new PostForm($this);
		
		$this->postEditor = new PSK_UI_DBEditor($this, 'dbeditor');
		$this->postEditor->setListModel($this->postlist);
		$this->postEditor->setFormModel($this->postform);
		
		$this->RenderView('posts');
		
		//$this->log->WriteArray($this->postlist->FieldProperties());
	}
}